package com.shop.front.vo.user;

import com.alibaba.fastjson.annotation.JSONField;
import com.shop.common.enums.user.AuditStatusEnum;
import com.shop.jpa.domain.BaseDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@ApiModel("UserBalanceWithdrawalVo 用户提现记录表")
@Data
public class UserBalanceWithdrawalVo extends BaseDomain implements Serializable {

    @Id
    @ApiModelProperty(value = "id", hidden = true)
    @Column(name = "id")
    @JSONField(serialize=false)
    private Long id;

    /**
     * 银行卡号
     */
    @Column(name = "bank_card_no")
    @ApiModelProperty("银行卡号")
    private String bankCardNo;

    /**
     * 银行名称
     */
    @Column(name = "bank_name")
    @ApiModelProperty("银行名称")
    private String bankName;

    /**
     * 银行缩写
     */
    @Column(name = "bank_short_name")
    @ApiModelProperty("银行缩写")
    private String bankShortName;

    /**
     * 银行预留手机号
     */
    @Column(name = "mobile")
    @ApiModelProperty("银行预留手机号")
    private String mobile;

    /**
	 * 支付金额
	 */
	@Column(name = "pay_amount")
    @ApiModelProperty("支付金额")
    private BigDecimal payAmount;

    /**
     * 到账金额
     */
    @Column(name = "arrival_amount")
    @ApiModelProperty("到账金额")
    private BigDecimal arrivalAmount;

    /**
     * 手续费
     */
    @Column(name = "fees")
    @ApiModelProperty("手续费")
    private BigDecimal fees;

    /**
     * 订单号
     */
    @Column(name = "order_no")
    @ApiModelProperty("订单号")
    private String orderNo;

    /**
	 * 状态 0 审核中 1 审核通过 -1 审核未通过
	 */
	@Column(name = "status")
    @ApiModelProperty("状态 0 审核中 1 审核通过 -1 审核未通过")
    private Integer status;

    /**
     * 审核时间
     */
    @Column(name = "audit_time")
    @ApiModelProperty("审核时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date auditTime;

    /**
     * 审核意见
     */
    @Column(name = "audit_suggest")
    @ApiModelProperty("审核意见")
    private String auditSuggest;

    /**
	 * 创建时间
	 */
	@Column(name = "create_time")
    @ApiModelProperty("创建时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("审核状态")
	@Transient
	private String statusStr;
    public String getStatusStr(){
        return AuditStatusEnum.val(this.status).getMsg();
    }
}